package org.example.Day9;

import java.io.*;

public class BufferInputStreamTest {
    public static void main(String[] args){
        try(
                InputStream is = new FileInputStream("D:/AAAA暑期实训/level2/src/a1.txt");
                InputStream bis = new BufferedInputStream(is);
                OutputStream os = new FileOutputStream("D:/AAAA暑期实训/level2/src/a1copy.txt");
                OutputStream bos = new BufferedOutputStream(os);

                ){
            byte[] buffer = new byte[1024];
            int len;
            while ((len= bis.read(buffer))!=-1){
                bos.write(buffer,0,15);
            }
            System.out.println("复制完成!!");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
